package com.jasonli.dao;

import com.jasonli.domain.Client;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ClientDao {

    @Select("select * from client where username = #{username} and password = #{password}")
    public Client getByUsernameAndPassword(@Param("username") String username, @Param("password") String password);

    //    添加顾客
    @Insert("insert into client values(null,#{username},#{password},#{phone},#{sex},#{text})")
    public boolean save(Client client);


    //    查询所有
    @Select("select * from client")
    public List<Client> getAll();

}
